﻿USE [AbhimanuSite]
GO
/****** Object:  Table [dbo].[UserInfo]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[UserInfo](
	[UserID] [bigint] IDENTITY(1,1) NOT NULL,
	[FirstName] [varchar](50) NOT NULL,
	[LastName] [varchar](50) NOT NULL,
	[EmailID] [varchar](100) NOT NULL,
	[Password] [varchar](20) NOT NULL,
	[FatherName] [varchar](50) NULL,
	[Occupation] [varchar](50) NULL,
	[Address] [varchar](50) NULL,
	[Phone] [varchar](20) NULL,
	[Mobile] [varchar](20) NULL,
	[Course] [varchar](50) NULL,
	[RegistrationNo] [varchar](50) NOT NULL,
	[YearOfAdmission] [int] NOT NULL,
	[SelectCenter] [varchar](50) NOT NULL,
	[Subject] [varchar](100) NULL,
	[CreatedDate] [datetime] NOT NULL,
	[LastModifiedDate] [datetime] NOT NULL,
	[LoginType] [varchar](1) NULL,
	[Title] [varchar](5) NULL,
 CONSTRAINT [PK_UserInfo] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[TestSection]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TestSection](
	[SectionID] [int] IDENTITY(1,1) NOT NULL,
	[Section] [varchar](50) NOT NULL,
	[TestType] [varchar](10) NULL,
 CONSTRAINT [PK_TestSection] PRIMARY KEY CLUSTERED 
(
	[SectionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[TestQuestion]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TestQuestion](
	[QuestionID] [bigint] IDENTITY(1,1) NOT NULL,
	[Question] [varchar](1000) NOT NULL,
	[AnsA] [varchar](255) NOT NULL,
	[AnsB] [varchar](255) NOT NULL,
	[AnsC] [varchar](255) NOT NULL,
	[AnsD] [varchar](255) NOT NULL,
	[CorrectAns] [varchar](10) NOT NULL,
	[SectionID] [int] NOT NULL,
 CONSTRAINT [PK_TestQuestion] PRIMARY KEY CLUSTERED 
(
	[QuestionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[QueryAnswer]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[QueryAnswer](
	[AnswerID] [bigint] IDENTITY(1,1) NOT NULL,
	[QueryID] [bigint] NOT NULL,
	[AnswerText] [varchar](500) NOT NULL,
	[FacultyID] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_QueryAnswer] PRIMARY KEY CLUSTERED 
(
	[AnswerID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[OnlineExam]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[OnlineExam](
	[ExamID] [bigint] IDENTITY(1,1) NOT NULL,
	[UserID] [bigint] NOT NULL,
	[TestType] [varchar](10) NOT NULL,
	[ExamCategory] [varchar](50) NOT NULL,
	[PaperData] [text] NOT NULL,
	[ExamLevel] [varchar](15) NULL,
	[Status] [varchar](10) NULL,
	[StartTime] [datetime] NOT NULL,
	[EndTime] [datetime] NOT NULL,
	[Marks] [varchar](10) NOT NULL,
	[Percentage] [varchar](5) NOT NULL,
 CONSTRAINT [PK_OnlineExam] PRIMARY KEY CLUSTERED 
(
	[ExamID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[MemberActivity]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[MemberActivity](
	[ActivityID] [bigint] IDENTITY(1,1) NOT NULL,
	[ActText] [varchar](1000) NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[UserID] [bigint] NOT NULL,
	[LikeCount] [int] NOT NULL,
	[CommentCount] [int] NOT NULL,
 CONSTRAINT [PK_MemberActivity] PRIMARY KEY CLUSTERED 
(
	[ActivityID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[DiscussionResponse]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DiscussionResponse](
	[ResponseID] [bigint] IDENTITY(1,1) NOT NULL,
	[UserID] [bigint] NOT NULL,
	[ResponseText] [varchar](400) NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[DiscussionID] [bigint] NOT NULL,
 CONSTRAINT [PK_DiscussionResponse] PRIMARY KEY CLUSTERED 
(
	[ResponseID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Discussion]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Discussion](
	[DiscussionID] [bigint] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](255) NOT NULL,
	[Description] [varchar](1000) NOT NULL,
	[UserID] [bigint] NOT NULL,
	[CreatedDate] [date] NOT NULL,
 CONSTRAINT [PK_Discussion] PRIMARY KEY CLUSTERED 
(
	[DiscussionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[AskQuery]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[AskQuery](
	[QueryID] [bigint] IDENTITY(1,1) NOT NULL,
	[Subject] [varchar](100) NOT NULL,
	[Message] [varchar](500) NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[StudentID] [bigint] NOT NULL,
	[FacultyID] [bigint] NOT NULL,
 CONSTRAINT [PK_AskQuery] PRIMARY KEY CLUSTERED 
(
	[QueryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[ActivityLike]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ActivityLike](
	[ActivityID] [bigint] NOT NULL,
	[UserID] [bigint] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[ActivityComment]    Script Date: 06/01/2012 21:16:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ActivityComment](
	[CommentID] [bigint] IDENTITY(1,1) NOT NULL,
	[ActivityID] [bigint] NOT NULL,
	[CommentText] [varchar](500) NOT NULL,
	[UserID] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_ActivityComment] PRIMARY KEY CLUSTERED 
(
	[CommentID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
